package com.shigui.news.enums;

public enum ResponseCode {
	
	SUCCESS("200","成功"),
	FAIL("404","失败"),
	
	USER_ALREADY_LOGOUT("10003", "你已登出"),
	USER_LOGIN_FAIL("10007","登录失败"),
	USER_INVALID_OPERATION("10004", "校验。。"),
	USER_USERNAME_EMPTY("10005", "用户名不可为空"),
	USER_INVALID_USERNAME("10005", "用户名的长度应为6～10位"),
	
	CATEGORY_FIND_NEWS("20001","新闻类别不存在"),
	CATEGORY_ADD("20002","添加失败"),
	CATEGORY_DELETE("20003","删除失败"),
	CATEGORY_UPDATE("20004","更新失败"),
	
	NEWS_FIND("30001","新闻不存在"),
	NEWS_ADD("30002","添加失败"),
	NEWS_DELETE("30003","删除失败"),
	NEWS_UPDATE("30004","更新失败"),
	
	COMMENT_FIND("40001","评论不存在"),
	COMMENT_ADD("40002","添加失败"),
	COMMENT_DELETE("40003","删除失败"),
	COMMENT_UPDATE("40004","更新失败");
	
	
	
	
	private String code;
	private String description;
	
	
	private ResponseCode(String code,String description){
		this.code = code;
		this.description = description;		
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
	public static String getDescription(String description) {
		return "";
	}
	
	
}
